package org.springblade.third.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.mp.base.BaseEntity;


import java.util.List;


@Data
@EqualsAndHashCode(callSuper = true)
@TableName("blade_channel")
public class Channel extends BaseEntity {

	/**
	 * 第三方数据源渠道
	 * 1.渠道编码
	 * 2.渠道描述
	 * 3.渠道配置
	 * 4.渠道状态
	 */

    @Schema(description = "渠道主键ID")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    @Schema(description = "渠道编码，唯一标识不同第三方渠道")
    private String channelCode;

    @Schema(description = "渠道名称")
    private String channelName;

    @Schema(description = "渠道描述")
    private String channelDesc;

    @Schema(description = "渠道配置，JSON 字符串或 KV；建议存储为 JSON")
    private String channelConfig;

    @Schema(description = "是否启用：1 启用，0 停用")
    private Integer enabled;
	/**
	 * 第三方数据源产品
	 * 1.产品编码
	 * 2.渠道编码
	 * 3.产品名称
	 */

    @Schema(description = "渠道下关联的产品")
    @JsonSerialize(using = ToStringSerializer.class)
    private List<String> productId;
}
